cmake_minimum_required(VERSION 3.16)
project(mytextures LANGUAGES CXX)

#set(CMAKE_PREFIX_PATH "/home/linaro/Qt6/lib/cmake/")

set(CMAKE_AUTOMOC ON)

if(NOT DEFINED INSTALL_EXAMPLESDIR)
    set(INSTALL_EXAMPLESDIR "examples")
endif()

set(INSTALL_EXAMPLEDIR "${INSTALL_EXAMPLESDIR}/opengl/textures")

find_package(Qt6 REQUIRED COMPONENTS Core Gui OpenGL OpenGLWidgets Widgets)

qt_add_executable(mytextures
    widget.cpp
    widget.h
    main.cpp
    Timer.cpp
    Timer.h
)

set_target_properties(mytextures PROPERTIES
    WIN32_EXECUTABLE TRUE
    MACOSX_BUNDLE TRUE
)

target_link_libraries(mytextures PUBLIC
    Qt::Core
    Qt::Gui
    Qt::OpenGL
    Qt::OpenGLWidgets
    Qt::Widgets
)
